﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace NLBS.Common
{
    /// <summary>
    ///help for httprequest convert
    /// </summary>
   public class WebRequest
    {
       
       /// <summary>
       /// convert query to int
       /// </summary>
       /// <param name="strName"></param>
       /// <returns></returns>
       public static int GetQueryInt(string strName)
       {
           if (HttpContext.Current.Request.QueryString[strName] != null)
           {
               return Convert.ToInt32(HttpContext.Current.Request.QueryString[strName]);
           }
           return -1;
       }

       public static string GetQueryString(string strName)
       {
           if (HttpContext.Current.Request.QueryString[strName] == null)
           {
               return "";
           }
           return HttpContext.Current.Request.QueryString[strName];
       }
    }
}
